package com.wuxiaoqin.admin.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuxiaoqin.admin.entity.Address;
import com.wuxiaoqin.admin.service.IAdService;
import com.wuxiaoqin.admin.service.IAddressService;
import com.wuxiaoqin.uitls.respObj.RespBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/address")
public class AddressController {

    @Autowired
    private IAddressService addressService;

    @ApiOperation(value = "登录之后返回token")
    @GetMapping("/getAllAddress")
    public Page<Address> getAllAddress(@RequestParam("pageSize") Integer pageSize,
                                       @RequestParam("pageNo") Integer pageNo){
        return addressService.getAllAddress(pageSize,pageNo);
    }
}
